home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games Extra 1996 September / Amiga Games Extra CD-ROM 9-1996.iso / userbox / demoversionen / awebdemo / install < prev    next >
Text File  |  1996-07-06  |  17KB  |  478 lines

  1. ; $VER: Install_AWeb 1.0 (14.03.96)
  2. ; Description: Installer script for AWeb
  3.  
  4. (set cpu (database "cpu"))
  5. (set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  6. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  7.  
  8. (set awn (getversion "AWeb"))
  9. (set awv (/ awn 65536))
  10. (set awr (- awn (* awv 65536)))
  11.  
  12. ; all strings used in this installer script
  13. (set #need39 "This program requires OS 3.0 or later to function.")
  14. (set #nohelp "No help available.")
  15. (set #welcome
  16.    (cat "AWeb is a fast, multithreaded World Wide Web browser for Amiga OS 3.0.\nAWeb doesn't use MUI.\nIt runs with a wide variety of TCP-stacks.\nAWeb can read your old AMosaic hotlists.\nIt has an ARexx and Shell command interface."
  17.       ("\n\nThis installation procedure will install the AWeb browser version %ld.%ld DEMO and the necessary ClassAct gadget classes on your system.\n" awv awr)
  18.       "It will not overwrite your existing preferences"
  19.       "\n\nThis DEMO version is not intended for registered users"
  20.    )
  21. )
  22. (set #registered-prompt "Are you a registered (shareware) AWeb user?")
  23. (set #registered-msg "This DEMO version is not for registered users. The\nhttp://www.xs4all.nl/~yrozijn/aweb/\npage contains information on how to get the latest registered version.\n\nThe installation procedure will end here.")
  24. (set #destdir-prompt "Please select the directory where you want AWeb installed.\n(If you do not accept the default, a directory 'AWeb' will be created there.)")
  25. (set #destdir-help "A directory for AWeb will be created here. By accepting the default directory, most of the files don't have to be copied.")
  26. (set #installing "Installing ")
  27. (set #languages-prompt "Please select which language catalog(s) you want to install")
  28. (set #languages-help @askoptions-help)
  29. (set #icons-prompt "Please select what icon you want to install")
  30. (set #icons-help "The archive is shipped with three different icons for the AWeb program.\nIcons for the standard Workbench, for Magic WB and for NewIcon are included.\n\nPlease select which of these icons you want to be installed.")
  31. (set #icons-message
  32.    (cat "You may want to edit the AWeb icon by hand afterwards. "
  33.       "The little square in the unselected image was designed to be red. "
  34.       "Because you may have another Workbench palette installed than the default, "
  35.       "the square may be in another colour. You can use an icon editor to correct it.\n\n"
  36.       "This does not affect the operation of the AWeb demo, of course."
  37.    )
  38. )
  39. (set #memory-prompt "Is your Amiga equipped with more than 2MB of memory?")
  40. (set #memory-help "AWeb runs perfectly on a 2MB Amiga, but needs a special setup on such a machine. If you click the 'only 2MB' button, the appropriate settings will be installed.\n\nYou can always change the settings after installation.")
  41. (set #fonts-prompt "Do you want to use small or large fonts for your browser window?\nSmall fonts are based on times.font/13,\nlarge fonts are based on times.font/15 with larger headings than the small font.")
  42. (set #fonts-help 
  43.    (cat "If you choose 'large fonts', settings will be installed that make AWeb look as closely to the standard NetScape setup as possible, using standard Workbench fonts.\n\n"
  44.       "Please note that the 'large fonts' settings need the CGTimes scalable font properly installed.\n\n"
  45.       "If you plan to run AWeb on a small screen (less than 640 x 400), you might want to select 'small fonts' to make the pages readable.\n\nYou can always change the settings after installation.")
  46.    )
  47.  
  48. (set #readme "Displaying the version notes readme...")
  49. (set #bye "In case you need help configuring or using AWeb, pressing the HELP key when AWeb is active will bring up the documentation.\nI hope you will enjoy using AWeb.\n\nIf you like AWeb, please consider to buy the commercial product to support continued development.")
  50.  
  51. ; ---------------------------------------------------------------------------
  52.  
  53. ; ************* PLEASE COPY THIS PROCEDURE ALONG WITH THE STRINGS IT USES 
  54. ; ************* TO THE INSTALLER SCRIPT OF YOUR CLASSACT APPLICATION.
  55. ; ************* IT WILL TAKE CARE OF INSTALLING THE CLASSACT CLASSES YOU
  56. ; ************* PROVIDED WITH YOUR APPLICATION TO THE USER'S SYSTEM.
  57.  
  58. ; ClassAct installation procedure V 1.5 (12.5.96) by Osma Ahvenlampi
  59.  
  60. ; percentage of the size of included ClassAct classes versus the whole
  61. ; distribution (ie. total "complete" percentage after ClassAct is installed)
  62. (set classact-complete 50)
  63.  
  64. ; ClassAct installer scripts
  65. (set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)")
  66. (set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nSome programs require some or all of the ClassAct classes installed on your system. "
  67.     (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.")
  68.             (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.")
  69.         )
  70.     )
  71. )
  72. (set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?")
  73. (set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.")
  74. (set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.")
  75. (set #creating-dir "Creating directory ")
  76. (set #usbackup-prompt "User-Startup will now be backed up.")
  77. (set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old")
  78. (set #adding-1 "Adding ")
  79. (set #adding-2 " to LIBS: assign\n")
  80. (set #adding-help "This is necessary so that the custom classes can be found.")
  81. (set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?")
  82. (set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.")
  83. (set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.")
  84. (set #caprefs-message "CAPrefs is a small utility that sets some user preferences for ClassAct applications. These include the bevel style (Thin/Gadtools/Xen), window backfills, and group label details.\n\nPlease use the ClassAct GUI prefs editor to alter the default settings provided. ClassAct prefs will be installed in your system Prefs drawer.\n\n")
  85. (set #caprefs-startup-1 "Adding the command\n\n")
  86. (set #caprefs-startup-2 "\n\nTo your s:User-Startup.")
  87.  
  88. (procedure install-classact
  89. ; call this procedure to copy the classes included in the Classes directory
  90. ; in your distribution dir.
  91.     (if (exists "Classes") ; The archive contains a ClassAct library update.
  92.     (
  93.         (set comp-dest  (/ (* classact-complete 2) 10))
  94.         (set comp-libs  (/ (* classact-complete 3) 10))
  95.         (set comp-dirs  (/ (* classact-complete 4) 10))
  96.         (set comp-junod (/ (* classact-complete 5) 10))
  97.         (set comp-020   (/ (* classact-complete 6) 10))
  98.         (set comp-gad   (/ (* classact-complete 7) 10))
  99.         (set comp-im    (/ (* classact-complete 8) 10))
  100.         (set comp-prefs (/ (* classact-complete 9) 10))
  101.     
  102.         ; has the user installed ClassAct in CLASSACT: ?
  103.         (set @classact-dest (getassign "CLASSACT" "A"))
  104.         (if (= @classact-dest "") (set @classact-dest "SYS:Classes"))
  105.         
  106.         ; is ClassAct already in SYS:Classes ?
  107.         (if (or (not (exists (tackon @classact-dest "Gadgets/layout.gadget") (noreq)))
  108.                 (= @user-level 2))
  109.             ; no, ask where it should be placed
  110.             (set @classact-dest
  111.                 (askdir
  112.                     (prompt #classdest-prompt)
  113.                     (help #classdest-help)
  114.                     (default @classact-dest)
  115.                     (newpath)
  116.                 )
  117.             )
  118.         )
  119.         
  120.         (complete comp-dest)
  121.         
  122.         (if (<> (run (cat "C/CheckAssign LIBS: " @classact-dest)) 0)
  123.             (
  124.                 (message #noclasses-message)
  125.                 (if (not (exists @classact-dest))
  126.                     (makedir @classact-dest (prompt (cat #creating-dir @classact-dest)))
  127.                 )
  128.                 (set @addassign (cat "Assign >NIL: LIBS: " @classact-dest " ADD\n"))
  129.                 (startup "CLASSACT"
  130.                     (command @addassign)
  131.                     (prompt (cat #adding-1 @classact-dest #adding-2))
  132.                     (help #adding-help)
  133.                 )
  134.                 (run (@addassign))
  135.             )
  136.         )
  137.         
  138.         (complete comp-libs)
  139.         
  140.         (set @classact-gadgets (tackon @classact-dest "Gadgets"))
  141.         (set @classact-images (tackon @classact-dest "Images"))
  142.         
  143.         (if (not (exists @classact-gadgets (noreq)))
  144.             (makedir @classact-images
  145.                 (prompt (cat #creating-dir @classact-gadgets))
  146.             )
  147.         )
  148.         
  149.         (if (not (exists @classact-images (noreq)))
  150.             (makedir @classact-images
  151.                 (prompt (cat #creating-dir @classact-images))
  152.             )
  153.         )
  154.         
  155.         (complete comp-dirs)
  156.         
  157.         (if (exists "SYS:Classes/Gadgets/button.gadget")
  158.             (if (< 40 (/ (getversion "SYS:Classes/Gadgets/button.gadget") 65536))
  159.                 (if (askbool (prompt #junod-button) (help @askbool-help) (default 1))
  160.                     (
  161.                         (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42")
  162.                         (message #junod-backed)
  163.                     )
  164.                     (message #junod-kept)
  165.                 )
  166.             )
  167.         )
  168.         
  169.         (complete comp-junod)
  170.         
  171.         (if (exists "Classes/Gadgets/layout.gadget.020")
  172.             (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default (and cpu020 v39))))
  173.             (set classes-020 0)
  174.         )
  175.  
  176.         (complete comp-020)
  177.         
  178.         (foreach "Classes/Gadgets" "#?.gadget"
  179.             (
  180.                 (set thislib (tackon "Classes/Gadgets" @each-name))
  181.                 (if (and classes-020 (exists (cat thislib ".020")))
  182.                     (set thislib (cat thislib ".020"))
  183.                 )
  184.                 (copylib (source thislib)
  185.                     (dest @classact-gadgets)
  186.                     (newname @each-name)
  187.                     (prompt (cat #installing @each-name))
  188.                     (help #classdest-help)
  189.                     (optional "force" "askuser")
  190.                 )
  191.             )
  192.         )
  193.         
  194.         (complete comp-gad)
  195.         
  196.         (foreach "Classes/Images" "#?.image"
  197.             (
  198.                 (set thislib (tackon "Classes/Images" @each-name))
  199.                 (if (and classes-020 (exists (cat thislib ".020")))
  200.                     (set thislib (cat thislib ".020"))
  201.                 )
  202.                 (copylib (source thislib)
  203.                     (dest @classact-images)
  204.                     (newname @each-name)
  205.                     (prompt (cat #installing @each-name))
  206.                     (help #classdest-help)
  207.                     (optional "force" "askuser")
  208.                 )
  209.             )
  210.         )
  211.         
  212.         (complete comp-im)
  213.  
  214.         (foreach "Classes" "#?.class"
  215.             (
  216.                 (set thislib (tackon "Classes" @each-name))
  217.                 (if (and classes-020 (exists (cat thislib ".020")))
  218.                     (set thislib (cat thislib ".020"))
  219.                 )
  220.                 (copylib (source thislib)
  221.                     (dest @classact-dest)
  222.                     (newname @each-name)
  223.                     (prompt (cat #installing @each-name))
  224.                     (help #classdest-help)
  225.                     (optional "force" "askuser")
  226.                 )
  227.             )
  228.         )
  229.     )
  230.     )
  231.     (if (exists "Prefs/ClassAct") ; The archive contains ClassAct prefs tools
  232.     (
  233.         (message #caprefs-message)
  234.         
  235.         (copylib (source "Prefs/CAPrefs") 
  236.             (dest "C:") 
  237.             (prompt (cat #installing "CAPrefs"))
  238.         )
  239.         (copylib (source "Prefs/ClassAct")
  240.             (dest "SYS:Prefs")
  241.             (prompt (cat #installing "ClassAct Prefs"))
  242.             (infos)
  243.         )
  244.         
  245.         (complete comp-prefs)
  246.         
  247.         (if (not (exists "ENVARC:ClassAct" (noreq)))
  248.             (
  249.                 (makedir "ENVARC:ClassAct"
  250.                     (prompt (cat #creating-dir "ENVARC:ClassAct"))
  251.                 )
  252.                 (textfile (dest "ENVARC:ClassAct/ClassAct")
  253.                     (append "")
  254.                 )
  255.             )
  256.         )
  257.                 
  258.         (set caprefs-cmd "C:CAPrefs >NIL:\n")
  259.         
  260.         (startup "CAPREFS"
  261.             (prompt (cat #caprefs-startup-1 caprefs-cmd #caprefs-startup-2))
  262.             (help #caprefs-message)
  263.             (command caprefs-cmd)
  264.         )
  265.     )
  266.     )
  267.  
  268.     (complete classact-complete)
  269. )
  270.  
  271. ; ************** END OF CLASSACT INSTALL PROCEDURE. COPY THE BLOCK ABOVE
  272. ; ************** TO YOUR CLASSACT APPLICATION INSTALLER.
  273.  
  274. ; ---------------------------------------------------------------------------
  275.  
  276. (complete 0)
  277.  
  278. (if (not v39)
  279.    (abort #need39)
  280. )
  281.  
  282. (message #welcome)
  283.  
  284. (if
  285.    (askbool
  286.       (prompt #registered-prompt)
  287.       (help @askbool-help)
  288.       (choices "Yes" "No")
  289.       (default 0)
  290.    )
  291.    (  (complete 100)
  292.       (message #registered-msg)
  293.       (exit (quiet))
  294.    )
  295. )
  296.  
  297. (set @source-dir (pathonly @icon))
  298.  
  299. (set defdir
  300.    (askdir
  301.       (prompt #destdir-prompt)
  302.       (help #destdir-help)
  303.       (default @source-dir)
  304.    )
  305. )
  306. (set @default-dest defdir)
  307.  
  308. (set nocopy (= @source-dir @default-dest))
  309.  
  310. (install-classact)
  311.  
  312. (if (not nocopy)
  313.     (
  314.        (set @default-dest (tackon @default-dest "AWeb"))
  315.     
  316.        (set update-aweb (exists @default-dest))
  317.     
  318.        (if (not update-aweb)
  319.            (makedir @default-dest 
  320.                (prompt #creating-dir @default-dest) 
  321.                (infos)
  322.            )
  323.        )
  324.  
  325.       (copyfiles
  326.          (source "")
  327.          (dest @default-dest)
  328.          (choices "AWeb")
  329.          (prompt #installing "AWeb")
  330.       )
  331.  
  332.        (copyfiles
  333.          (source "")
  334.           (dest @default-dest)
  335.          (choices "ReadMe" "Docs" "Icons" "Extras" "Images" "Storage")
  336.           (prompt #installing "AWeb")
  337.           (infos)
  338.        )
  339.  
  340.       (complete 70)
  341.  
  342.       (set languages
  343.          (askoptions
  344.             (choices "English" 
  345.                "Czech" "Dansk" "Deutsch" "Español" 
  346.                "Français" "Greek"
  347.                "Italiano" "Nederlands" "Norsk"
  348.             )
  349.             (prompt #languages-prompt)
  350.             (help #languages-help)
  351.             (default 1)
  352.          )
  353.       )
  354.       (if (bitand languages 65534)
  355.          (
  356.             (set catdir (tackon @default-dest "Catalogs"))
  357.             (if (not (exists catdir))
  358.                (makedir catdir
  359.                   (prompt #creating-dir catdir)
  360.                )
  361.             )
  362.             (set bit 2)
  363.             (set langnr 1)
  364.             (while (< langnr 9)
  365.                (if (bitand languages bit)
  366.                   (
  367.                      (set lang
  368.                         (select langnr "English"
  369.                            "Czech" "Dansk" "Deutsch" "Español"
  370.                            "Français" "Greek"
  371.                            "Italiano" "Nederlands" "Norsk"
  372.                         )
  373.                      )
  374.                      (copyfiles
  375.                         (source (tackon "Catalogs" lang))
  376.                         (choices "AWeb.catalog")
  377.                         (dest (tackon catdir lang))
  378.                      )
  379.                   )
  380.                )
  381.                (set bit (shiftleft bit 1))
  382.                (set langnr (+ langnr 1))
  383.             )
  384.          )
  385.       )
  386.  
  387.     )
  388. )
  389.  
  390. (complete 80)
  391.  
  392. (if (or nocopy (not (exists (tackon @default-dest "AWeb.info"))))
  393.    (
  394.       (set #icontype
  395.          (askchoice
  396.             (prompt #icons-prompt)
  397.             (choices
  398.                "Standard"
  399.                "Magic WB"
  400.                "NewIcon"
  401.             )
  402.             (help #icons-help)
  403.          )
  404.       )
  405.  
  406.       (copyfiles
  407.          (source
  408.             (select #icontype
  409.                "Icons/AWeb.info"
  410.                "Icons/AWeb_MagicWB.info"
  411.                "Icons/AWeb_NewIcon.info"
  412.             )
  413.          )
  414.          (dest @default-dest)
  415.          (newname "AWeb.info")
  416.          (infos)
  417.       )
  418.  
  419.       (if (= #icontype 0)
  420.          (message #icons-message)
  421.       )
  422.    )
  423. )
  424.  
  425. (complete 90)
  426.  
  427. (if (not (exists (tackon @default-dest "AWeb.prefs")))
  428.    (if (exists "AWeb.prefs")
  429.       (copyfiles
  430.          (source "AWeb.prefs")
  431.          (dest @default-dest)
  432.       )
  433.       (  (set #memory
  434.             (askbool
  435.                (prompt #memory-prompt)
  436.                (help #memory-help)
  437.                (choices "More than 2MB" "Only 2MB")
  438.                (default 1)
  439.             )
  440.          )
  441.       
  442.          (set #fonts
  443.             (askbool
  444.                (prompt #fonts-prompt)
  445.                (help #fonts-help)
  446.                (choices "Large fonts" "Small fonts")
  447.                (default 0)
  448.             )
  449.          )
  450.       
  451.          (copyfiles
  452.             (source
  453.                (select (+ (* #memory 2) #fonts)
  454.                   "AWeb.prefs_2MB_small"
  455.                   "AWeb.prefs_2MB_large"
  456.                   "AWeb.prefs_small"
  457.                   "AWeb.prefs_large"
  458.                )
  459.             )
  460.             (dest @default-dest)
  461.             (newname "AWeb.prefs")
  462.          )
  463.       
  464.          (if (= #memory 0)
  465.             (makedir
  466.                (tackon @default-dest "T")
  467.             )
  468.          )
  469.       )
  470.    )
  471. )
  472.  
  473. (complete 100)
  474.  
  475. (run "run >NIL: SYS:Utilities/MultiView README" (prompt #readme))
  476.  
  477. (exit #bye)
  478.